// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** toggleFavorite POST /api/reco/favorite/toggle */
export async function toggleFavoriteUsingPost(
  body: Record<string, any>,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsestring>('/api/reco/favorite/toggle', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** list GET /api/reco/list */
export async function listUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListInterfaceInfo>('/api/reco/list', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** placements GET /api/reco/placements */
export async function placementsUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.placementsUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.PlacementItem[]>('/api/reco/placements', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** rebuild POST /api/reco/rebuild */
export async function rebuildUsingPost(options?: { [key: string]: any }) {
  return request<string>('/api/reco/rebuild', {
    method: 'POST',
    ...(options || {}),
  });
}
